package com.isunland.managesystem.adapter;

import android.content.Context;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BaseListAdapter;
import com.isunland.managesystem.entity.StageDefinePropertyOriginal;
import java.util.List;

/**
 * Created by lenovo on 2016/7/4.
 */
public class StageDefinePropertyListAdapter
    extends BaseListAdapter<StageDefinePropertyOriginal.StageDefinePropertyContent> {
  public StageDefinePropertyListAdapter(Context context,
      List<StageDefinePropertyOriginal.StageDefinePropertyContent> objects) {
    super(context, objects);
  }

  @Override public void bindData(int position, ViewHolder vh,
      StageDefinePropertyOriginal.StageDefinePropertyContent item) {
    vh.mTitleOneTv.setText(R.string.propertyName);

    vh.mTitleTwoTv.setText(R.string.propertyType);
    vh.mTitleThreeTv.setText(R.string.propertyValue);
    vh.mContentOneTv.setText(item.getSdefpropName());
    //        vh.mContentTwoTv.setText(item.getSdefpropEditKind());
    if ("01".equalsIgnoreCase(item.getSdefpropEditKind())) {
      vh.mContentTwoTv.setText("文字");
    } else if ("02".equalsIgnoreCase(item.getSdefpropEditKind())) {
      vh.mContentTwoTv.setText("日期");
    } else if ("03".equalsIgnoreCase(item.getSdefpropEditKind())) {
      vh.mContentTwoTv.setText("文档");
    }

    vh.mContentThreeTv.setText(item.getSdefpropValue());
  }
}
